import re

pattern = r'\d+'
text = '123456x12x123'
arr = re.findall(pattern,text)
print(arr)